import {
  CreateDateColumn,
  UpdateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
} from 'typeorm';
import { Exclude } from 'class-transformer';

@Entity()
export class BaseEntity {
  @PrimaryGeneratedColumn({ type: 'int' })
  id: number;

  @Exclude()
  @CreateDateColumn({ type: 'datetime' })
  create_time: string;

  @Exclude()
  @UpdateDateColumn({ type: 'datetime' })
  update_time: string;
}
